// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
// Copyright (C) Leszek Pomianowski and WPF UI Contributors.
// All Rights Reserved.

using AppSettingConfiguratorModule.Views;
using Se.CommunityToolkit.Module;
using System.Collections.ObjectModel;
using Microsoft.Extensions.DependencyInjection;

namespace AppSettingConfiguratorModule;

[SeCommunityToolkitModule]
public class ConfiguratorModule : ICanAddModule
{
    public void AddModule(ObservableCollection<object> menuItems)
    {
        menuItems.Add(new Wpf.Ui.Controls.NavigationViewItem("Editor", Wpf.Ui.Controls.SymbolRegular.Home24,
            typeof(EditorControl)));
    }

    public void AddService(IServiceCollection services)
    {
        services.AddTransientFromNamespace("AppSettingConfiguratorModule.Views", ConfiguratorAssembly.Asssembly);
        services.AddTransientFromNamespace("AppSettingConfiguratorModule.ViewModels", ConfiguratorAssembly.Asssembly);
    }
}